package cn.iocoder.yudao.module.call.dal.mysql.acsnlpresult;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.acsnlpresult.AcsNlpResultDO;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.acsnlpresult.vo.*;

/**
 * 对话记录 Mapper
 *
 * @author 数创万维
 */
@Mapper
@DS("cm")
public interface AcsNlpResultMapper extends BaseMapperX<AcsNlpResultDO> {

    default PageResult<AcsNlpResultDO> selectPage(AcsNlpResultPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AcsNlpResultDO>()
                .eqIfPresent(AcsNlpResultDO::getCallId, reqVO.getCallId())
                .eqIfPresent(AcsNlpResultDO::getType, reqVO.getType())
                .eqIfPresent(AcsNlpResultDO::getResult, reqVO.getResult())
                .betweenIfPresent(AcsNlpResultDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AcsNlpResultDO::getId));
    }

}